<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>sim.getObjectHandle</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1>Regular API function</h1>
<h3 class=subsectionBar><a name="simGetObjectHandle" id="simGetObjectHandle"></a>sim.getObjectHandle</h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>Retrieves an object handle based on its path and alias. See also  <a href="simIsHandle.htm">sim.isHandle</a> and <a href="simGetObjectUniqueIdentifier.htm">sim.getObjectUniqueIdentifier</a>.<br></td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn>From C/C++, call <a href="simGetObjectHandleEx.htm">simGetObjectHandleEx</a> instead.</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>int objectHandle=sim.getObjectHandle(string objectPath,table options={})</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>objectPath</strong>: the path and alias of the object to find. See the section on <a href="../accessingSceneObjects.htm">accessing scene objects</a> for details.</div>
<div><strong>options</strong>: optional table indicating how the object should be searched. {<strong>noError</strong>=true} will generate a silent error if an object was not found. {<strong>index</strong>=n} will fetch the n-th object (zero based index) that satisfies the specified objectPath. {<strong>proxy</strong>=proxyObjectHandle} allows to search the hierarchy tree of the specified proxy object.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>objectHandle</strong>: The handle of the object, or -1 in case the object was not found.</div>
</td> 
</tr> 

<tr class=apiTableTr> 
<td class=remApiTableLeftCParam>
Remote API equiv.
</td> 
<td class=remApiTableRightCParam>
<div>B0-based remote API: <a href="../b0RemoteApi-cpp.htm#simxGetObjectHandle">simxGetObjectHandle</a></div>
<div>Legacy remote API: <a href="../remoteApiFunctions.htm#simxGetObjectHandle">simxGetObjectHandle</a></div>
</td> 
</tr> 

</table> 


<br>
</td>
</tr>
</table>
</div>
</body>
</html>
